Multiple representations - Discrete Data

To change, enter or delete data and respective frequencies alter the values in the Data List and Associated Frequencies Text Input Boxes

Discrete

Raw Data

Freq

C.Freq

n

Data List :

Associated Frequencies :

Data to Freq

100% - Max

75%

50%

25%

Min

Quartiles

Boxplot

Freq to data

Cumulative Freq Polygon

Cumulative Freq Bars

Freq Bars

c = false
RawFreq: {6, 10, 12, 13, 10, 16, 15, 12, 6, 5, 3, 3, 2}
n = 10 (slider from 0 to Length[RawData], step 1)
Freq = Sequence(Element[RawFreq, i], i, 1, n)
CFreq = Sequence(Sum[Sequence[Element[Freq, i], i, 1, k]], k, 1, n)
RawData: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
Data = Sequence(Element[RawData, i], i, 1, n)
list2 = Sequence((Element[Data, i], Element[CFreq, i]), i, 1, n)
list3 = Sequence((Element[Data, i + 1], Element[CFreq, i]), i, 1, n - 1)
list5 = Sequence({Element[list2, i], Element[list3, i]}, i, 1, n)
list6 = Join(Sequence[Element[list5, i], i, 1, n - 1])
listLast: {(Element[Data, n] + 1, Element[CFreq, n])}
listPen: {(Element[Data, n], Element[CFreq, n])}
listFirst: {(Element[Data, 1], 0)}
list1 = Join({listFirst, list6, listPen, listLast})
A2 = 1
A3 = 2
A4 = 3
A5 = 4
A6: 2 * A5 - A4
A7: 2 * A6 - A5
A8: 2 * A7 - A6
A9: 2 * A8 - A7
A10: 2 * A9 - A8
A11: 2 * A10 - A9
A12: 2 * A11 - A10
A13: 2 * A12 - A11
A14: 2 * A13 - A12
A15: 2 * A14 - A13
A16: 2 * A15 - A14
A17: 2 * A16 - A15
A18: 2 * A17 - A16
A19: 2 * A18 - A17
A20: 2 * A19 - A18
A21: 2 * A20 - A19
A22: 2 * A21 - A20
A23: 2 * A22 - A21
A24: 2 * A23 - A22
A25: 2 * A24 - A23
A26: 2 * A25 - A24
A27: 2 * A26 - A25
A28: 2 * A27 - A26
A29: 2 * A28 - A27
A30: 2 * A29 - A28
A31: 2 * A30 - A29
B17 = Element(Data, A17)
B18 = Element(Data, A18)
B19 = Element(Data, A19)
B20 = Element(Data, A20)
B21 = Element(Data, A21)
B22 = Element(Data, A22)
B23 = Element(Data, A23)
B24 = Element(Data, A24)
B25 = Element(Data, A25)
B26 = Element(Data, A26)
B27 = Element(Data, A27)
B28 = Element(Data, A28)
B29 = Element(Data, A29)
B30 = Element(Data, A30)
B31 = Element(Data, A31)
C17 = Element(Freq, A17)
C18 = Element(Freq, A18)
C19 = Element(Freq, A19)
C20 = Element(Freq, A20)
C21 = Element(Freq, A21)
C22 = Element(Freq, A22)
C23 = Element(Freq, A23)
C24 = Element(Freq, A24)
C25 = Element(Freq, A25)
C26 = Element(Freq, A26)
C27 = Element(Freq, A27)
C28 = Element(Freq, A28)
C29 = Element(Freq, A29)
C30 = Element(Freq, A30)
C31 = Element(Freq, A31)
D17 = Element(CFreq, A17)
D18 = Element(CFreq, A18)
D19 = Element(CFreq, A19)
D20 = Element(CFreq, A20)
D21 = Element(CFreq, A21)
D22 = Element(CFreq, A22)
D23 = Element(CFreq, A23)
D24 = Element(CFreq, A24)
D25 = Element(CFreq, A25)
D26 = Element(CFreq, A26)
D27 = Element(CFreq, A27)
D28 = Element(CFreq, A28)
D29 = Element(CFreq, A29)
D30 = Element(CFreq, A30)
D31 = Element(CFreq, A31)
B10 = Element(Data, A10)
B2 = Element(Data, A2)
C2 = Element(Freq, A2)
D2 = Element(CFreq, A2)
B3 = Element(Data, A3)
C3 = Element(Freq, A3)
D3 = Element(CFreq, A3)
B4 = Element(Data, A4)
C4 = Element(Freq, A4)
D4 = Element(CFreq, A4)
B5 = Element(Data, A5)
C5 = Element(Freq, A5)
D5 = Element(CFreq, A5)
B6 = Element(Data, A6)
C6 = Element(Freq, A6)
D6 = Element(CFreq, A6)
B7 = Element(Data, A7)
C7 = Element(Freq, A7)
D7 = Element(CFreq, A7)
B8 = Element(Data, A8)
C8 = Element(Freq, A8)
D8 = Element(CFreq, A8)
B9 = Element(Data, A9)
C9 = Element(Freq, A9)
D9 = Element(CFreq, A9)
C10 = Element(Freq, A10)
D10 = Element(CFreq, A10)
B11 = Element(Data, A11)
C11 = Element(Freq, A11)
D11 = Element(CFreq, A11)
B12 = Element(Data, A12)
C12 = Element(Freq, A12)
D12 = Element(CFreq, A12)
B13 = Element(Data, A13)
C13 = Element(Freq, A13)
D13 = Element(CFreq, A13)
B14 = Element(Data, A14)
C14 = Element(Freq, A14)
D14 = Element(CFreq, A14)
B15 = Element(Data, A15)
C15 = Element(Freq, A15)
D15 = Element(CFreq, A15)
B16 = Element(Data, A16)
C16 = Element(Freq, A16)
D16 = Element(CFreq, A16)
a = BarChart(Data, Freq)
cDiscrete = PolyLine(If[c, list1, list2])
list4: {Sequence[Element[list2, i], i, 1, n - 1], Sequence[Element[list3, i], i, 1, n - 1]}
b = BarChart(Data, CFreq, 1)
MinData = Min(RawData)
Maxdata = Max(Data)
d = Segment((MinData - 0.5, 0), (Maxdata, 0))
A = Point(d)
B, B_1 = Intersect(x = x(A), cDiscrete)
e = Segment(A, B)
A': (-1, If[x(A) < 0, 0, y(B)])
C = Point(d)
D, D_1 = Intersect(x = x(C), cDiscrete)
g = Segment(C, D)
C': (-1, If[x(C) < 0, 0, y(D)])
i = Segment((-1, 0), (-1, Max[CFreq]))
E = Point(i)
inputBox1 = Textfield(RawData)
inputBox2 = Textfield(RawFreq)
numRawData = Length(RawData)
numRawFreq = Length(RawFreq)
text1: "(" + numRawData + ") data points"
text2: "(" + numRawFreq + ") frequencies"
FrequencyCount = Segment(C', A')
text3: "$ \begin{array}{} Frequency \\ count \end{array} = " + (LaTeX[FrequencyCount]) + " $"
h = Segment(If[x(C) < 0, C, D], (-1, If[x(C) < 0, 0, y(D)]))
f = Segment(If[x(A) < 0, A, B], (-1, If[x(A) < 0, 0, y(B)]))
j = Segment(C, A)
k = false
l = Segment(Intersect[y = Max[CFreq], cDiscrete], (-1, Max[CFreq]))
m = Segment(Intersect[y = Min[CFreq], cDiscrete], (-1, Min[CFreq]))
p = Segment(Intersect[y = 0.5 * Max[CFreq], cDiscrete], (-1, 0.5 * Max[CFreq]))
q = Segment(Intersect[y = 0.75 * Max[CFreq], cDiscrete], (-1, 0.75 * Max[CFreq]))
r = Segment(Intersect[y = 0.25 * Max[CFreq], cDiscrete], (-1, 0.25 * Max[CFreq]))
Mpos_1, Mpos_2 = Intersect(y = 0.5 * Max[CFreq], cDiscrete)
Q1pos_1, Q1pos_2 = Intersect(y = 0.25 * Max[CFreq], cDiscrete)
Q3pos_1, Q3pos_2 = Intersect(y = 0.75 * Max[CFreq], cDiscrete)
Maxpos_1, Maxpos_2, Maxpos_3 = Intersect(y = Max[CFreq], cDiscrete)
Minpos_1, Minpos_2 = Intersect(y = Min[CFreq], cDiscrete)
G = Intersect(d_1, l)
H = Intersect(d_1, q)
I = Intersect(d_1, p)
J = Intersect(d_1, r)
K = Intersect(d_1, m)
o = false
u = BoxPlot(-7, 2.5, x(Minpos_1), x(Q1pos_1), x(Mpos_1), x(Q3pos_1), x(Maxpos_1))
c_1 = Segment(Maxpos_1, (x(Maxpos_1), -3.5))
a_1 = Segment(Q3pos_1, (x(Q3pos_1), -3.5))
t = Segment(Mpos_1, (x(Mpos_1), -3.5))
s = Segment(Q1pos_1, (x(Q1pos_1), -3.5))
b_1 = Segment(Minpos_1, (x(Minpos_1), -3.5))
v = false
e_1 = Segment(Intersect[y = y(E), cDiscrete], E)
P_1, P_2 = Intersect(y = y(E), cDiscrete)
f_1 = Segment(P_1, Intersect[y = 0, x = x(P_1)])
F = Intersect(y = 0, x = x(P_1))
w = false
z = true
g_1 = true
h_1 = true
DataTypeText = If(c, "Discrete", "Continuous")
text4: "" + DataTypeText + ""